par(mfrow=c(1,2));stap=0.01;seq=seq(0.005,0.995,0.01)

A=dbinom(20,50,seq);A=A/(sum(A)*stap)
B=dbinom(21,50,seq);B=B/(sum(B)*stap)
C=dbinom(30,50,seq);C=C/(sum(C)*stap)
plot(seq,A,type='p',col='red',ylim=c(0,8),axes=FALSE,
main=c(paste('2A. Respondent Profiles for Group 1, 2, and 3:'),
paste('The Influence of Distribution Location')),
xlab='Probability of Behaviour',ylab='Plausibility')
axis(side=1,at=seq(0,1,0.1));axis(side=2,at=seq(0,8,2),las=1)
points(seq,B,col='blue')
points(seq,C,col='green3')
points(seq[1:25],A[1:25],col='red')
legend('topright',cex=0.9,
c('Profile Group 1','Profile Group 2','Profile Group 3'),
col=c('red','blue','green3'),lty=c(1,1,1),bty='n')
arrows(0.40,0,0.40,A[41],col='red',length=0,lty=2)
arrows(0.42,0,0.42,B[43],col='blue',length=0,lty=2)
arrows(0.60,0,0.60,C[61],col='green3',length=0,lty=2)
points(0.305,A[31],col='red',lwd=4)
points(0.655,C[66],col='green3',lwd=4)
arrows(0.305,0,0.305,A[31],col='red',length=0,lty=3)
arrows(0.655,0,0.655,C[66],col='green3',length=0,lty=3)
arrows(0,A[31],0.305,A[31],col='red',length=0,lty=3)
arrows(0,C[66],0.655,C[66],col='green3',length=0,lty=3)

A=dbinom(32,80,seq);A=A/(sum(A)*stap)
B=dbinom(4,10,seq);B=B/(sum(B)*stap)
C=dbinom(24,40,seq);C=C/(sum(C)*stap)
plot(seq,C,type='l',lwd=2,col='green3',ylim=c(0,8),axes=FALSE,
main=c(paste('2B. Respondent Profiles for Group 1, 2, and 3:'),
paste('The Influence of Distribution Shape')),
xlab='Probability of Behaviour',ylab='Plausibility')
axis(side=1,at=seq(0,1,0.1));axis(side=2,at=seq(0,8,2),las=1)
lines(seq,A,col='red',lwd=2)
lines(seq,B,col='blue',lwd=2)
lines(seq[76:100],C[76:100],col='green3',lwd=2)
legend('topright',cex=0.9,
c('Profile Group 1','Profile Group 2','Profile Group 3'),
col=c('red','blue','green3'),lty=c(1,1,1),bty='n')
arrows(0.40,0,0.40,A[41],col='red',length=0,lty=2)
arrows(0.40,0,0.40,B[41],col='blue',length=0,lty=2)
arrows(0.60,0,0.60,C[61],col='green3',length=0,lty=2)
